import java.util.Scanner;

public class code1_3 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        double a = in.nextDouble();
        String b = in.next();
        int sum = 20;
        if(b.equals("y")) sum+=5;
        if(a>1) {
            int x = (int)Math.ceil(a-1);//向上取整
            sum += x;
        }
        System.out.print(sum);
    }
}
